 // 这是点击直接进入头部的
window.onscroll = function () { scrollFunction() };
function scrollFunction() {
  if (document.body.scrollTop > 650 || document.documentElement.scrollTop > 650) {
    document.querySelector(".top").style.display = "block";
  } else {
    document.querySelector(".top").style.display = "none";
  }
}
function topFunction() {
  document.body.scrollTop = 0;
  document.documentElement.scrollTop = 0;
}
// 这里用的swiper插件
function swiper(){
//这是swiper插件的轮播图
var swiper = new Swiper('.loginlubo', {
  spaceBetween: 30,
  centeredSlides: true,
  autoplay: {
    delay: 2500,
    disableOnInteraction: false,
  },
  pagination: {
    el: '.loginlubo .swiper-pagination',
    clickable: true,
  },
});
// autoplay自动切换
// 这是swiper插件的自动切换的样式
var mySwiper = new Swiper('.lubo_content2_1', {
  direction: 'vertical',
  loop: true,
  autoplay: {
    delay: 3000,//1秒切换一次
  },
});
}

// 这是点击进入首页页面
function homepage(){
  var click1=document.querySelector(".footer_bottom_in .homepage");
  click1.onclick=function(){
  location.href = '../html/home.html';
 }
}
// 这是点击进入分类页面
function homelist(){
  var click2=document.querySelector(".footer_bottom_in .homelist");
  click2.onclick=function(){
  location.href = '../html/homeList.html';
 }
}
// 这是点击进入购物车页面
function homeshop(){
  var click3=document.querySelector(".footer_bottom_in .homeshop");
  click3.onclick=function(){
  location.href = '../html/homeshop.html';
 }
}
// 这是点击进入我的页面
function myself(){
  var click4=document.querySelector(".footer_bottom_in .myself");
  click4.onclick=function(){
  location.href = '../html/myself.html';
 }
}


//这个是点击点击商品进入购买的页面 8个页面
function onclikBuy(){
  var click=document.querySelector(".lubo_content .one");
  click.onclick=function(){
  location.href = '../html/html_emption/emption.html';
 }
}
function onclikBuy2(){
  var click=document.querySelector(".lubo_content .two");
  click.onclick=function(){
  location.href = '../html/html_emption/emption1.html';
 }
}
function onclikBuy3(){
  var click=document.querySelector(".lubo_content .three");
  click.onclick=function(){
  location.href = '../html/html_emption/emption2.html';
 }
}
function onclikBuy4(){
  var click=document.querySelector(".lubo_content .four");
  click.onclick=function(){
  location.href = '../html/html_emption/emption3.html';
 }
}
function onclikBuy5(){
  var click=document.querySelector(".lubo_content .five");
  click.onclick=function(){
  location.href = '../html/html_emption/emption4.html';
 }
}
function onclikBuy6(){
  var click=document.querySelector(".lubo_content .six");
  click.onclick=function(){
  location.href = '../html/html_emption/emption5.html';
 }
}
function onclikBuy7(){
  var click=document.querySelector(".lubo_content .seven");
  click.onclick=function(){
  location.href = '../html/html_emption/emption6.html';
 }
}
function onclikBuy1(){
  var click=document.querySelector(".lubo_content .eight");
  click.onclick=function(){
  location.href = '../html/html_emption/emption7.html';
 }
}










swiper()
homepage()
homelist()
homeshop()
myself()
onclikBuy()
onclikBuy1()
onclikBuy2()
onclikBuy3()
onclikBuy4()
onclikBuy5()
onclikBuy6()
onclikBuy7()
